package com.dongqi.sceneState.controller;

import com.dongqi.sceneState.dto.SceneStateDTO;
import com.dongqi.sceneState.service.SceneStateService;
import com.dongqi.utils.RestResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 现场情况控制器
 */
@Slf4j
@RestController
@RequestMapping(value = "/sceneState")
public class SceneStateController {

    @Autowired
    private SceneStateService sceneStateService;

    /**
     * 现场情况查询接口
     * @return
     */
    @GetMapping("/query")
    public RestResult query() {
        SceneStateDTO sceneStateDTO = sceneStateService.queryAll();
        return RestResult.success(sceneStateDTO);
    }

}
